<template lang="">
  <van-button type="primary" replace :to="path" @click="clickAction">
    <i class="iconfont" :class="className"></i>
    <div class="txt">{{title}}</div>
  </van-button>
</template>

<script>
export default {
  name: "TabBarItem",
  props:['className','title','path'],
  methods: {
    clickAction(){
      this.$emit('changeIndex');
    }
  },
}
</script>

<style scoped lang="less">
  .iconfont{
    font-size: 20px;/*no*/
  }
  .normal{
    color: #ccc;
  }
  .light{
    color: #1296db;
  }
  .van-button{
    background-color: rgba(0, 0, 0, 0);
    border: 0;
  }
</style>